<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>培训复核</title>
    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../static/css/admin.css" media="all">
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card layui-form">
        <div class="layui-card-header" style="border-radius: 0;border-top: 4px solid #d2d2d2;">
        </div>
        <div class="layui-form layui-card-body layuiadmin-card-header-auto" lay-filter="layuiadmin-form-useradmin"
             id="layuiadmin-form-useradmin">
            <div class="layui-form-item" style="width: 820px">
                <label class="layui-form-label">培训名称：</label>
                <div class="layui-input-inline">
                    <input type="text" name="training_name" lay-verify="required" autocomplete="off" class="layui-input"
                           style="width: 820px">
                </div>
            </div>
            <div class="layui-form-item layui-inline" style="width: 400px">
                <label class="layui-form-label">培训讲师：</label>
                <div class="layui-input-inline">
                    <input type="text" name="teacher" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-inline">
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">培训时间：</label>
                    <div class="layui-form-item layui-inline" id="test6">
                        <div class="layui-input-inline">
                            <input type="text" name="start_time" autocomplete="off" id="test-startDate-1"
                                   class="layui-input"
                                   placeholder="开始日期" lay-verify="required">
                        </div>
                        <div class="layui-form-mid">至</div>
                        <div class="layui-input-inline">
                            <input type="text" name="end_time" autocomplete="off" id="test-endDate-1"
                                   class="layui-input"
                                   placeholder="结束日期" lay-verify="required">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">培训目的：</label>
                <div class="layui-input-block" style="width: 820px">
                    <textarea placeholder="请输入内容" name="purpose" class="layui-textarea"
                              lay-verify="required"></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">参训人员：</label>
                <div class="layui-input-block" style="width: 820px">
                    <textarea placeholder="请输入内容" name="people" class="layui-textarea" lay-verify="required"></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">培训简介：</label>
                <div class="layui-input-block" style="width: 820px">
                    <textarea placeholder="请输入内容" name="profile" class="layui-textarea"
                              lay-verify="required"></textarea>
                </div>
            </div>

<!--        <div class="layui-btn-container">-->
<!--            <button type="button" class="layui-btn layui-btn-normal" id="test8">选择文件</button>-->
<!--            <input id="training_url" name="training_url" hidden="hidden">-->
<!--            <button type="button" class="layui-btn" id="test9">上传附件</button>-->
<!--        </div>-->
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">培训资料：</label>
            <div class="layui-input-block" style="width: 820px">
                <textarea placeholder="请输入内容" name="training_url" class="layui-textarea"></textarea>
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">审核意见：</label>
            <div class="layui-input-block" style="width: 820px">
                <textarea placeholder="请输入内容" name="audit_advice" class="layui-textarea"
                          lay-verify="required"></textarea>
            </div>
        </div>
        <div class="layui-form-item layui-form-text layui-hide">
            <label class="layui-form-label">id</label>
            <div class="layui-input-block" style="width: 820px">
                <textarea placeholder="id" name="training_id" class="layui-textarea" lay-verify="required"></textarea>
            </div>
        </div>
        <div class="layui-form-item layui-hide">
            <input type="button" lay-submit lay-filter="LAY-user-front-submit" id="LAY-user-front-submit"
                   value="确认">
        </div>
    </div>
</div>
</div>
<!--<script src="js/jquery-2.0.3.min.js"></script>-->
<script src="../../static/layui/layui.js"></script>
<script type="text/javascript">
    // 日期格式转换函数
    function formatDate(str) {
        if (str != null) {
            var now = new Date(str);
            var year = now.getFullYear();  //取得4位数的年份
            var month = now.getMonth() + 1;  //取得日期中的月份，其中0表示1月，11表示12月
            var date = now.getDate();      //返回日期月份中的天数（1到31）
            return year + "-" + month + "-" + date;
        }
        return "";
    }
</script>
<script type="text/javascript">
    layui.config({
        base: '../../static/layui/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['layer', 'table', 'form', 'element', 'util', 'laydate', 'index', 'layedit', 'upload'], function () {
        var $ = layui.$
            , form = layui.form
            , layer = layui.layer
            , table = layui.table
            , element = layui.element
            , util = layui.util
            , layedit = layui.layedit
            , laydate = layui.laydate
            , upload = layui.upload;
        //常规用法
        laydate.render({
            elem: '#hiredate'
        });
        //===============================文件上传
        // var uploadInst = upload.render({
        //     elem: '#test8',//-----------
        //     url: '/training/uploadFileTraining', // 实际使用时改成您自己的上传接口即可。
        //     multiple: true,
        //     accept: 'file',
        //     auto: false,//-----------
        //     bindAction: '#test9',
        //     done: function (res) {
        //         layer.msg('上传成功');
        //         console.log(res)
        //         $('#training_url').val(res.urI)
        //         //
        //         $('#ID-upload-demo-text').html(''); // 置空上传失败的状态
        //     },
        // });
        /*时间选择*/
        laydate.render({
            elem: '#test6'
            //设置开始日期、日期日期的 input 选择器
            //数组格式为 2.6.6 开始新增，之前版本直接配置 true 或任意分割字符即可
            , range: ['#test-startDate-1', '#test-endDate-1']
        });
    });
</script>
</body>
</html>